<!DOCTYPE html>

<html>
<head>
  <title>presets.coffee</title>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
  <link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
  <div id="container">
    <div id="background"></div>
    
      <ul id="jump_to">
        <li>
          <a class="large" href="javascript:void(0);">Jump To &hellip;</a>
          <a class="small" href="javascript:void(0);">+</a>
          <div id="jump_wrapper">
          <div id="jump_page">
            
              
              <a class="source" href="analyze.html">
                analyze.coffee
              </a>
            
              
              <a class="source" href="autoload.html">
                autoload.coffee
              </a>
            
              
              <a class="source" href="blender.html">
                blender.coffee
              </a>
            
              
              <a class="source" href="calculate.html">
                calculate.coffee
              </a>
            
              
              <a class="source" href="caman.html">
                caman.coffee
              </a>
            
              
              <a class="source" href="convert.html">
                convert.coffee
              </a>
            
              
              <a class="source" href="event.html">
                event.coffee
              </a>
            
              
              <a class="source" href="filter.html">
                filter.coffee
              </a>
            
              
              <a class="source" href="io.html">
                io.coffee
              </a>
            
              
              <a class="source" href="layer.html">
                layer.coffee
              </a>
            
              
              <a class="source" href="logger.html">
                logger.coffee
              </a>
            
              
              <a class="source" href="module.html">
                module.coffee
              </a>
            
              
              <a class="source" href="pixel.html">
                pixel.coffee
              </a>
            
              
              <a class="source" href="plugin.html">
                plugin.coffee
              </a>
            
              
              <a class="source" href="renderer.html">
                renderer.coffee
              </a>
            
              
              <a class="source" href="store.html">
                store.coffee
              </a>
            
              
              <a class="source" href="util.html">
                util.coffee
              </a>
            
              
              <a class="source" href="blenders.html">
                blenders.coffee
              </a>
            
              
              <a class="source" href="filters.html">
                filters.coffee
              </a>
            
              
              <a class="source" href="size.html">
                size.coffee
              </a>
            
              
              <a class="source" href="blur.html">
                blur.coffee
              </a>
            
              
              <a class="source" href="camera.html">
                camera.coffee
              </a>
            
              
              <a class="source" href="compoundBlur.html">
                compoundBlur.coffee
              </a>
            
              
              <a class="source" href="edges.html">
                edges.coffee
              </a>
            
              
              <a class="source" href="posterize.html">
                posterize.coffee
              </a>
            
              
              <a class="source" href="presets.html">
                presets.coffee
              </a>
            
              
              <a class="source" href="rotate.html">
                rotate.coffee
              </a>
            
              
              <a class="source" href="stackBlur.html">
                stackBlur.coffee
              </a>
            
              
              <a class="source" href="threshold.html">
                threshold.coffee
              </a>
            
          </div>
        </li>
      </ul>
    
    <ul class="sections">
        
          <li id="title">
              <div class="annotation">
                  <h1>presets.coffee</h1>
              </div>
          </li>
        
        
        
        <li id="section-1">
            <div class="annotation">
              
              <div class="pilwrap ">
                <a class="pilcrow" href="#section-1">&#182;</a>
              </div>
              
            </div>
            
            <div class="content"><div class='highlight'><pre>Caman.Filter.register <span class="string">"vintage"</span>, (vignette = <span class="literal">true</span>) -&gt;
  <span class="property">@greyscale</span>()
  <span class="property">@contrast</span> <span class="number">5</span>
  <span class="property">@noise</span> <span class="number">3</span>
  <span class="property">@sepia</span> <span class="number">100</span>
  <span class="property">@channels</span> red: <span class="number">8</span>, blue: <span class="number">2</span>, green: <span class="number">4</span>
  <span class="property">@gamma</span> <span class="number">0.87</span>

  <span class="property">@vignette</span>(<span class="string">"40%"</span>, <span class="number">30</span>) <span class="keyword">if</span> vignette

Caman.Filter.register <span class="string">"lomo"</span>, (vignette = <span class="literal">true</span>) -&gt;
  <span class="property">@brightness</span> <span class="number">15</span>
  <span class="property">@exposure</span> <span class="number">15</span>
  <span class="property">@curves</span> <span class="string">'rgb'</span>, [<span class="number">0</span>, <span class="number">0</span>], [<span class="number">200</span>, <span class="number">0</span>], [<span class="number">155</span>, <span class="number">255</span>], [<span class="number">255</span>, <span class="number">255</span>]
  <span class="property">@saturation</span> -<span class="number">20</span>
  <span class="property">@gamma</span> <span class="number">1.8</span>
  <span class="property">@vignette</span>(<span class="string">"50%"</span>, <span class="number">60</span>) <span class="keyword">if</span> vignette
  <span class="property">@brightness</span> <span class="number">5</span>

Caman.Filter.register <span class="string">"clarity"</span>, (grey = <span class="literal">false</span>) -&gt;
  <span class="property">@vibrance</span> <span class="number">20</span>
  <span class="property">@curves</span> <span class="string">'rgb'</span>, [<span class="number">5</span>, <span class="number">0</span>], [<span class="number">130</span>, <span class="number">150</span>], [<span class="number">190</span>, <span class="number">220</span>], [<span class="number">250</span>, <span class="number">255</span>]
  <span class="property">@sharpen</span> <span class="number">15</span>
  <span class="property">@vignette</span> <span class="string">"45%"</span>, <span class="number">20</span>

  <span class="keyword">if</span> grey
    <span class="property">@greyscale</span>()
    <span class="property">@contrast</span> <span class="number">4</span>

  @

Caman.Filter.register <span class="string">"sinCity"</span>, -&gt;
  <span class="property">@contrast</span> <span class="number">100</span>
  <span class="property">@brightness</span> <span class="number">15</span>
  <span class="property">@exposure</span> <span class="number">10</span>
  <span class="property">@posterize</span> <span class="number">80</span>
  <span class="property">@clip</span> <span class="number">30</span>
  <span class="property">@greyscale</span>()

Caman.Filter.register <span class="string">"sunrise"</span>, -&gt;
  <span class="property">@exposure</span> <span class="number">3.5</span>
  <span class="property">@saturation</span> -<span class="number">5</span>
  <span class="property">@vibrance</span> <span class="number">50</span>
  <span class="property">@sepia</span> <span class="number">60</span>
  <span class="property">@colorize</span> <span class="string">"#e87b22"</span>, <span class="number">10</span>
  <span class="property">@channels</span> red: <span class="number">8</span>, blue: <span class="number">8</span>
  <span class="property">@contrast</span> <span class="number">5</span>
  <span class="property">@gamma</span> <span class="number">1.2</span>
  <span class="property">@vignette</span> <span class="string">"55%"</span>, <span class="number">25</span>

Caman.Filter.register <span class="string">"crossProcess"</span>, -&gt;
  <span class="property">@exposure</span> <span class="number">5</span>
  <span class="property">@colorize</span> <span class="string">"#e87b22"</span>, <span class="number">4</span>
  <span class="property">@sepia</span> <span class="number">20</span>
  <span class="property">@channels</span> blue: <span class="number">8</span>, red: <span class="number">3</span>
  <span class="property">@curves</span> <span class="string">'b'</span>, [<span class="number">0</span>, <span class="number">0</span>], [<span class="number">100</span>, <span class="number">150</span>], [<span class="number">180</span>, <span class="number">180</span>], [<span class="number">255</span>, <span class="number">255</span>]
  <span class="property">@contrast</span> <span class="number">15</span>
  <span class="property">@vibrance</span> <span class="number">75</span>
  <span class="property">@gamma</span> <span class="number">1.6</span>

Caman.Filter.register <span class="string">"orangePeel"</span>, -&gt;
  <span class="property">@curves</span> <span class="string">'rgb'</span>, [<span class="number">0</span>, <span class="number">0</span>], [<span class="number">100</span>, <span class="number">50</span>], [<span class="number">140</span>, <span class="number">200</span>], [<span class="number">255</span>, <span class="number">255</span>]
  <span class="property">@vibrance</span> -<span class="number">30</span>
  <span class="property">@saturation</span> -<span class="number">30</span>
  <span class="property">@colorize</span> <span class="string">'#ff9000'</span>, <span class="number">30</span>
  <span class="property">@contrast</span> -<span class="number">5</span>
  <span class="property">@gamma</span> <span class="number">1.4</span>

Caman.Filter.register <span class="string">"love"</span>, -&gt;
  <span class="property">@brightness</span> <span class="number">5</span>
  <span class="property">@exposure</span> <span class="number">8</span>
  <span class="property">@contrast</span> <span class="number">4</span>
  <span class="property">@colorize</span> <span class="string">'#c42007'</span>, <span class="number">30</span>
  <span class="property">@vibrance</span> <span class="number">50</span>
  <span class="property">@gamma</span> <span class="number">1.3</span>

Caman.Filter.register <span class="string">"grungy"</span>, -&gt;
  <span class="property">@gamma</span> <span class="number">1.5</span>
  <span class="property">@clip</span> <span class="number">25</span>
  <span class="property">@saturation</span> -<span class="number">60</span>
  <span class="property">@contrast</span> <span class="number">5</span>
  <span class="property">@noise</span> <span class="number">5</span>
  <span class="property">@vignette</span> <span class="string">"50%"</span>, <span class="number">30</span>

Caman.Filter.register <span class="string">"jarques"</span>, -&gt;
  <span class="property">@saturation</span> -<span class="number">35</span>
  <span class="property">@curves</span> <span class="string">'b'</span>, [<span class="number">20</span>, <span class="number">0</span>], [<span class="number">90</span>, <span class="number">120</span>], [<span class="number">186</span>, <span class="number">144</span>], [<span class="number">255</span>, <span class="number">230</span>]
  <span class="property">@curves</span> <span class="string">'r'</span>, [<span class="number">0</span>, <span class="number">0</span>], [<span class="number">144</span>, <span class="number">90</span>], [<span class="number">138</span>, <span class="number">120</span>], [<span class="number">255</span>, <span class="number">255</span>]
  <span class="property">@curves</span> <span class="string">'g'</span>, [<span class="number">10</span>, <span class="number">0</span>], [<span class="number">115</span>, <span class="number">105</span>], [<span class="number">148</span>, <span class="number">100</span>], [<span class="number">255</span>, <span class="number">248</span>]
  <span class="property">@curves</span> <span class="string">'rgb'</span>, [<span class="number">0</span>, <span class="number">0</span>], [<span class="number">120</span>, <span class="number">100</span>], [<span class="number">128</span>, <span class="number">140</span>], [<span class="number">255</span>, <span class="number">255</span>]
  <span class="property">@sharpen</span> <span class="number">20</span>

Caman.Filter.register <span class="string">"pinhole"</span>, -&gt;
  <span class="property">@greyscale</span>()
  <span class="property">@sepia</span> <span class="number">10</span>
  <span class="property">@exposure</span> <span class="number">10</span>
  <span class="property">@contrast</span> <span class="number">15</span>
  <span class="property">@vignette</span> <span class="string">"60%"</span>, <span class="number">35</span>

Caman.Filter.register <span class="string">"oldBoot"</span>, -&gt;
  <span class="property">@saturation</span> -<span class="number">20</span>
  <span class="property">@vibrance</span> -<span class="number">50</span>
  <span class="property">@gamma</span> <span class="number">1.1</span>
  <span class="property">@sepia</span> <span class="number">30</span>
  <span class="property">@channels</span> red: -<span class="number">10</span>, blue: <span class="number">5</span>
  <span class="property">@curves</span> <span class="string">'rgb'</span>, [<span class="number">0</span>, <span class="number">0</span>], [<span class="number">80</span>, <span class="number">50</span>], [<span class="number">128</span>, <span class="number">230</span>], [<span class="number">255</span>, <span class="number">255</span>]
  <span class="property">@vignette</span> <span class="string">"60%"</span>, <span class="number">30</span>

Caman.Filter.register <span class="string">"glowingSun"</span>, (vignette = <span class="literal">true</span>) -&gt;
  <span class="property">@brightness</span> <span class="number">10</span>

  <span class="property">@newLayer</span> -&gt;
    <span class="property">@setBlendingMode</span> <span class="string">"multiply"</span>
    <span class="property">@opacity</span> <span class="number">80</span>
    <span class="property">@copyParent</span>()

    <span class="property">@filter</span>.gamma <span class="number">0.8</span>
    <span class="property">@filter</span>.contrast <span class="number">50</span>
    <span class="property">@filter</span>.exposure <span class="number">10</span>

  <span class="property">@newLayer</span> -&gt;
    <span class="property">@setBlendingMode</span> <span class="string">"softLight"</span>
    <span class="property">@opacity</span> <span class="number">80</span>
    <span class="property">@fillColor</span> <span class="string">"#f49600"</span>

  <span class="property">@exposure</span> <span class="number">20</span>
  <span class="property">@gamma</span> <span class="number">0.8</span>
  <span class="property">@vignette</span> <span class="string">"45%"</span>, <span class="number">20</span> <span class="keyword">if</span> vignette

Caman.Filter.register <span class="string">"hazyDays"</span>, -&gt;
  <span class="property">@gamma</span> <span class="number">1.2</span>

  <span class="property">@newLayer</span> -&gt;
    <span class="property">@setBlendingMode</span> <span class="string">"overlay"</span>
    <span class="property">@opacity</span> <span class="number">60</span>
    <span class="property">@copyParent</span>()

    <span class="property">@filter</span>.channels red: <span class="number">5</span>
    <span class="property">@filter</span>.stackBlur <span class="number">15</span>

  <span class="property">@newLayer</span> -&gt;
    <span class="property">@setBlendingMode</span> <span class="string">"addition"</span>
    <span class="property">@opacity</span> <span class="number">40</span>
    <span class="property">@fillColor</span> <span class="string">"#6899ba"</span>

  <span class="property">@newLayer</span> -&gt;
    <span class="property">@setBlendingMode</span> <span class="string">"multiply"</span>
    <span class="property">@opacity</span> <span class="number">35</span>
    <span class="property">@copyParent</span>()

    <span class="property">@filter</span>.brightness <span class="number">40</span>
    <span class="property">@filter</span>.vibrance <span class="number">40</span>
    <span class="property">@filter</span>.exposure <span class="number">30</span>
    <span class="property">@filter</span>.contrast <span class="number">15</span>

    <span class="property">@filter</span>.curves <span class="string">'r'</span>, [<span class="number">0</span>, <span class="number">40</span>], [<span class="number">128</span>, <span class="number">128</span>], [<span class="number">128</span>, <span class="number">128</span>], [<span class="number">255</span>, <span class="number">215</span>]
    <span class="property">@filter</span>.curves <span class="string">'g'</span>, [<span class="number">0</span>, <span class="number">40</span>], [<span class="number">128</span>, <span class="number">128</span>], [<span class="number">128</span>, <span class="number">128</span>], [<span class="number">255</span>, <span class="number">215</span>]
    <span class="property">@filter</span>.curves <span class="string">'b'</span>, [<span class="number">0</span>, <span class="number">40</span>], [<span class="number">128</span>, <span class="number">128</span>], [<span class="number">128</span>, <span class="number">128</span>], [<span class="number">255</span>, <span class="number">215</span>]

    <span class="property">@filter</span>.stackBlur <span class="number">5</span>

  <span class="property">@curves</span> <span class="string">'r'</span>, [<span class="number">20</span>, <span class="number">0</span>], [<span class="number">128</span>, <span class="number">158</span>], [<span class="number">128</span>, <span class="number">128</span>], [<span class="number">235</span>, <span class="number">255</span>]
  <span class="property">@curves</span> <span class="string">'g'</span>, [<span class="number">20</span>, <span class="number">0</span>], [<span class="number">128</span>, <span class="number">128</span>], [<span class="number">128</span>, <span class="number">128</span>], [<span class="number">235</span>, <span class="number">255</span>]
  <span class="property">@curves</span> <span class="string">'b'</span>, [<span class="number">20</span>, <span class="number">0</span>], [<span class="number">128</span>, <span class="number">108</span>], [<span class="number">128</span>, <span class="number">128</span>], [<span class="number">235</span>, <span class="number">255</span>]

  <span class="property">@vignette</span> <span class="string">"45%"</span>, <span class="number">20</span>

Caman.Filter.register <span class="string">"herMajesty"</span>, -&gt;
  <span class="property">@brightness</span> <span class="number">40</span>
  <span class="property">@colorize</span> <span class="string">"#ea1c5d"</span>, <span class="number">10</span>
  <span class="property">@curves</span> <span class="string">'b'</span>, [<span class="number">0</span>, <span class="number">10</span>], [<span class="number">128</span>, <span class="number">180</span>], [<span class="number">190</span>, <span class="number">190</span>], [<span class="number">255</span>, <span class="number">255</span>]

  <span class="property">@newLayer</span> -&gt;
    <span class="property">@setBlendingMode</span> <span class="string">'overlay'</span>
    <span class="property">@opacity</span> <span class="number">50</span>
    <span class="property">@copyParent</span>()

    <span class="property">@filter</span>.gamma <span class="number">0.7</span>
    <span class="property">@newLayer</span> -&gt;
      <span class="property">@setBlendingMode</span> <span class="string">'normal'</span>
      <span class="property">@opacity</span> <span class="number">60</span>
      <span class="property">@fillColor</span> <span class="string">'#ea1c5d'</span>

  <span class="property">@newLayer</span> -&gt;
    <span class="property">@setBlendingMode</span> <span class="string">'multiply'</span>
    <span class="property">@opacity</span> <span class="number">60</span>
    <span class="property">@copyParent</span>()

    <span class="property">@filter</span>.saturation <span class="number">50</span>
    <span class="property">@filter</span>.hue <span class="number">90</span>
    <span class="property">@filter</span>.contrast <span class="number">10</span>

  <span class="property">@gamma</span> <span class="number">1.4</span>
  <span class="property">@vibrance</span> -<span class="number">30</span>

  <span class="property">@newLayer</span> -&gt;
    <span class="property">@opacity</span> <span class="number">10</span>
    <span class="property">@fillColor</span> <span class="string">'#e5f0ff'</span>

  @

Caman.Filter.register <span class="string">"nostalgia"</span>, -&gt;
  <span class="property">@saturation</span> <span class="number">20</span>
  <span class="property">@gamma</span> <span class="number">1.4</span>
  <span class="property">@greyscale</span>()
  <span class="property">@contrast</span> <span class="number">5</span>
  <span class="property">@sepia</span> <span class="number">100</span>
  <span class="property">@channels</span> red: <span class="number">8</span>, blue: <span class="number">2</span>, green: <span class="number">4</span>
  <span class="property">@gamma</span> <span class="number">0.8</span>
  <span class="property">@contrast</span> <span class="number">5</span>
  <span class="property">@exposure</span> <span class="number">10</span>

  <span class="property">@newLayer</span> -&gt;
    <span class="property">@setBlendingMode</span> <span class="string">'overlay'</span>
    <span class="property">@copyParent</span>()
    <span class="property">@opacity</span> <span class="number">55</span>

    <span class="property">@filter</span>.stackBlur <span class="number">10</span>

  <span class="property">@vignette</span> <span class="string">"50%"</span>, <span class="number">30</span>

Caman.Filter.register <span class="string">"hemingway"</span>, -&gt;
  <span class="property">@greyscale</span>()
  <span class="property">@contrast</span> <span class="number">10</span>
  <span class="property">@gamma</span> <span class="number">0.9</span>

  <span class="property">@newLayer</span> -&gt;
    <span class="property">@setBlendingMode</span> <span class="string">"multiply"</span>
    <span class="property">@opacity</span> <span class="number">40</span>
    <span class="property">@copyParent</span>()

    <span class="property">@filter</span>.exposure <span class="number">15</span>
    <span class="property">@filter</span>.contrast <span class="number">15</span>
    <span class="property">@filter</span>.channels green: <span class="number">10</span>, red: <span class="number">5</span>

  <span class="property">@sepia</span> <span class="number">30</span>
  <span class="property">@curves</span> <span class="string">'rgb'</span>, [<span class="number">0</span>, <span class="number">10</span>], [<span class="number">120</span>, <span class="number">90</span>], [<span class="number">180</span>, <span class="number">200</span>], [<span class="number">235</span>, <span class="number">255</span>]
  <span class="property">@channels</span> red: <span class="number">5</span>, green: -<span class="number">2</span>
  <span class="property">@exposure</span> <span class="number">15</span>

Caman.Filter.register <span class="string">"concentrate"</span>, -&gt;
  <span class="property">@sharpen</span> <span class="number">40</span>
  <span class="property">@saturation</span> -<span class="number">50</span>
  <span class="property">@channels</span> red: <span class="number">3</span>

  <span class="property">@newLayer</span> -&gt;
    <span class="property">@setBlendingMode</span> <span class="string">"multiply"</span>
    <span class="property">@opacity</span> <span class="number">80</span>
    <span class="property">@copyParent</span>()

    <span class="property">@filter</span>.sharpen <span class="number">5</span>
    <span class="property">@filter</span>.contrast <span class="number">50</span>
    <span class="property">@filter</span>.exposure <span class="number">10</span>
    <span class="property">@filter</span>.channels blue: <span class="number">5</span>

  <span class="property">@brightness</span> <span class="number">10</span></pre></div></div>
            
        </li>
        
    </ul>
  </div>
</body>
</html>
